package com.iyimo.core{
	import com.iyimo.manager.LayerManager;
	
	import flash.display.Sprite;

	public class YEngine{
		private var _root:Sprite;
		private var _layerManager:LayerManager;
		
		private static var _instance:YEngine;
		
		public function YEngine(){}
		
		public static function get instance():YEngine{
			if (_instance == null)
				_instance = new YEngine();
			return _instance;
		}
		
		public function init(root:Sprite):void{
			_root = root;
			_layerManager = new LayerManager();
			_layerManager.init(_root);
		}

		public function get layerManager():LayerManager{
			return _layerManager;
		}

		public function get width():int{
			return _root.stage.width;
		}
		
		public function get height():int{
			return _root.stage.height;
		}
	}
}